package com.fast.cms.model.article;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 附件表
 * 
 * @author Administrator
 */
@Entity
@Table(name = "t_cms_AttachFiles")
@DynamicInsert(true)
@DynamicUpdate(true)
public class AttachFiles implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id;
	private String uuid;
	private String filePath;// 文件地址
	private String fileName;// 文件名称
	private String fileColumnUUID;// 栏目UUID
	private String fileColumn;// 栏目名称
	private String typeUUID;//分类UUID
	private String typeName;// 分类名称
	private String fileExt;// 文件扩展名
	private String note;// 文件说明
	private String inTime;// 上传时间
	private long    fileSize;// 文件大小
	private String thirdUUID;// 对应第三方UUID
	private String thirdTitle;// 对应第三方标题
	private int    isDownload;// 是否可下载
	private int    downloadCount;//下载次数
	

	// 操作信息
	@Commnent("编辑人ID")
	@Column(name = "editor_id", length = 11)
	private int editorId = 0;// 编辑人Id
	@Commnent("编辑人")
	@Column(name = "editor_name", length = 32)
	private String editorName = "";// 编辑人
	@Commnent("编辑时间")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "edit_time")
	private Date editTime;// 编辑时间
	@Commnent("创建人ID")
	@Column(name = "creater_id", length = 11)
	private int createrId = 0;// 编辑人Id
	@Commnent("创建人")
	@Column(name = "creater", length = 32)
	private String creater = "";// 编辑人
	@Commnent("创建时间")
	@Column(name = "create_time", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Commnent("删除标识")
	@Column(name = "delete_flag", length = 1)
	private int deleteFlag = 0;// 默认为不删除，1为删除

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileColumn() {
		return fileColumn;
	}

	public void setFileColumn(String fileColumn) {
		this.fileColumn = fileColumn;
	}

	public String getFileExt() {
		return fileExt;
	}

	public void setFileExt(String fileExt) {
		this.fileExt = fileExt;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getInTime() {
		return inTime;
	}

	public void setInTime(String inTime) {
		this.inTime = inTime;
	}

	public int getIsDownload() {
		return isDownload;
	}

	public void setIsDownload(int isDownload) {
		this.isDownload = isDownload;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")  public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") 
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public String getFileColumnUUID() {
		return fileColumnUUID;
	}

	public void setFileColumnUUID(String fileColumnUUID) {
		this.fileColumnUUID = fileColumnUUID;
	}

	public String getTypeUUID() {
		return typeUUID;
	}

	public void setTypeUUID(String typeUUID) {
		this.typeUUID = typeUUID;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getThirdUUID() {
		return thirdUUID;
	}

	public void setThirdUUID(String thirdUUID) {
		this.thirdUUID = thirdUUID;
	}

	public String getThirdTitle() {
		return thirdTitle;
	}

	public void setThirdTitle(String thirdTitle) {
		this.thirdTitle = thirdTitle;
	}

	public int getDownloadCount() {
		return downloadCount;
	}

	public void setDownloadCount(int downloadCount) {
		this.downloadCount = downloadCount;
	}

	@Override
	public String toString() {
		return "AttachFiles [id=" + id + ", uuid=" + uuid + ", filePath=" + filePath + ", fileName=" + fileName
				+ ", fileColumnUUID=" + fileColumnUUID + ", fileColumn=" + fileColumn + ", typeUUID=" + typeUUID
				+ ", typeName=" + typeName + ", fileExt=" + fileExt + ", note=" + note + ", inTime=" + inTime
				+ ", fileSize=" + fileSize + ", thirdUUID=" + thirdUUID + ", thirdTitle=" + thirdTitle + ", isDownload="
				+ isDownload + ", downloadCount=" + downloadCount + ", editorId=" + editorId + ", editorName="
				+ editorName + ", editTime=" + editTime + ", createrId=" + createrId + ", creater=" + creater
				+ ", createTime=" + createTime + ", deleteFlag=" + deleteFlag + "]";
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public long getFileSize() {
		return fileSize;
	}

	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}
}
